﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucPhanLop.ascx.cs" Inherits="STT.Admin.UserControls.ucPhanLop" %>

<%--<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always">--%>
<%--<ContentTemplate>--%>
<style>
    #thediv_scroll1 {
        height: 100px;
        width: 100%;
        margin-left: 0px;
        overflow: auto; /* thuoc tinh nay lam xuat hien thanh cuon*/
    }


    #thediv_canle {
        padding-left: 40px;
    }
</style>

<div id="content-header">
    <div id="breadcrumb">
        <a href="../Default.aspx" class="tip-bottom" data-original-title="Về bảng điều khiển">
            <i class="icon-home"></i>Trang chủ
        </a>
        <a href="../Admin/Default.aspx?" class="current">Quản lý học viên</a>
        <a href="../Admin/Default.aspx?" class="current">Quản lý phân lớp</a>
    </div>
</div>
<div class="widget-box collapsible">
    <div class="control-group" style="border: thin solid #CCCCFF">
        <asp:Panel ID="plError" runat="server" Visible="false">
            <br />
            <div id="thediv_scroll1">
                <div id="thediv_canle">
                    <asp:Label ID="lbError" runat="server" ForeColor="Red"></asp:Label>
                </div>
            </div>
            <br />
        </asp:Panel>
    </div>

    <div class="widget-title">
        <a href="#collapseOne" data-toggle="collapse" class="">
            <span class="icon"><i class="icon-th"></i></span>
            <h5>Thông tin tìm kiếm</h5>
        </a>
    </div>
    <div class="in collapse" id="collapseOne" style="height: auto;">
        <div class="widget-content nopadding">
            <div class="dataTables_wrapper" role="grid">
                <%-- Cac dieu kien tim kiem --%>
                <div class="container-fluid">
                    <div class="row-fluid">
                        <div class="span6">
                            <div class="control-group">
                                <label class="control-label">Chọn khóa học: </label>
                                <div class="controls">

                                    <asp:DropDownList ID="ddKhoaHoc" runat="server" class="span20" AutoPostBack="True"
                                        OnSelectedIndexChanged="ddKhoaHoc_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label">Tìm kiếm học viên:</label>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Trình độ học vấn : </label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlTrinhDoNN" runat="server" class="span20">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Đơn vị:</label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddDonVi" runat="server" class="span20" ViewStateMode="Enabled">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Tên học viên:</label>
                                <div class="controls">
                                    <asp:TextBox ID="txtTen" runat="server" class="span20" placeholder="Tên"></asp:TextBox>
                                   
                                </div>
                            </div>
                        </div>

                        <div class="span6">
                            <div class="control-group">
                                <label class="control-label">Chọn lớp học: </label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddLopHoc" runat="server" class="span20" OnSelectedIndexChanged="ddLopHoc_SelectedIndexChanged"
                                        ViewStateMode="Enabled" AutoPostBack="True">
                                    </asp:DropDownList>

                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Điều kiện tìm kiếm</label>
                                <div class="controls">
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Trình độ chuyên môn :</label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlBangCap" runat="server" class="span20">
                                    </asp:DropDownList>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Chức vụ :</label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddChucVu" runat="server" CssClass="span20"></asp:DropDownList>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Số khóa học tham gia :</label>
                                <div class="controls">
                                    <asp:TextBox ID="txtSoKhoaHoc" runat="server" class="span20" placeholder="Số khóa học"></asp:TextBox>
                                    <asp:CompareValidator ID="CompareValidator1" Text="(Không đúng kiểu số)" ControlToValidate="txtSoKhoaHoc"
                                        Type="Double" Operator="DataTypeCheck" runat="server" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl">
                    <asp:Button ID="btTimKiem" runat="server" Text="Tìm kiếm" CssClass="btn btn-info"
                        OnClick="btTimKiem_Click" />
                </div>
            </div>
        </div>
    </div>

    <%-- Gridview ket qua tim kiem --%>
    <div class="widget-title">
        <a href="#collapseTwo" data-toggle="collapse" class="">
            <span class="icon"><i class="icon-th"></i></span>
            <h5>Kết quả tìm kiếm</h5>
        </a>
    </div>
    <div class="in collapse" id="collapseTwo" style="height: auto;">
        <div class="widget-content nopadding">
            <div id="DataTables_Table_0_wrapper" class="dataTables_wrapper" role="grid">
                <asp:GridView ID="gvHocVien" runat="server" AutoGenerateColumns="False"
                    DataKeyNames="MaHV" CssClass="table table-bordered table-hover"
                    OnPageIndexChanging="gvHocVien_PageIndexChanging" PageSize="20"
                    AllowPaging="True" ShowFooter="True">
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <%-- Bắt sự kiện nhấn cbChonTat --%>
                                <asp:CheckBox ID="cbChonTat" runat="server" onclick="cbChonTat(this);" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%-- Bắt sự kiện nhấn cbChon --%>
                                <asp:CheckBox ID="cbChon" runat="server" onclick="cbChon(this);" />
                            </ItemTemplate>
                            <ItemStyle Width="10px" HorizontalAlign="Center"></ItemStyle>
                        </asp:TemplateField>
                        <asp:BoundField DataField="MaHV" HeaderText="Mã HV"
                            ReadOnly="True" SortExpression="MaHV" />
                        <asp:BoundField DataField="Ten" HeaderText="Họ tên học viên"
                            SortExpression="Ten" />
                        <asp:BoundField DataField="TenDonVi" HeaderText="Đơn vị"
                            SortExpression="TenDonVi" />
                        <asp:BoundField DataField="TenChucVu" HeaderText="Chức vụ"
                            SortExpression="TenChucVu" />
                        <asp:BoundField DataField="TenTDChuyenMon" HeaderText="Chuyên môn"
                            SortExpression="TenTDChuyenMon" />
                        <asp:BoundField DataField="TenTDHocVan" HeaderText="Trình độ"
                            SortExpression="TenTDHocVan" />
                        <asp:BoundField DataField="SoKhoaHoc" HeaderText="Số khóa học"
                            SortExpression="SoKhoaHoc" />
                        <asp:BoundField DataField="Tuoi" HeaderText="Tuổi"
                            SortExpression="Tuoi" />
                    </Columns>
                </asp:GridView>

                <div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl">
                    <asp:Button ID="btnThemMoi" runat="server" Text="Thêm vào danh sách tạm thời" CssClass="btn btn-info"
                        OnClick="btnThemMoi_Click1" />

                </div>
            </div>
        </div>
    </div>


    <div class="widget-title">
        <a href="#collapseTwo" data-toggle="collapse" class="">
            <span class="icon"><i class="icon-th"></i></span>
            <h5>Danh sách học viên tạm thời</h5>
        </a>
    </div>
    <div class="in collapse" id="collapseThree" style="height: auto;">
        <div class="widget-content nopadding">
            <div id="DataTables_Table_0_wrapper" class="dataTables_wrapper" role="grid">
                <asp:GridView ID="gvHocVienTrongLop" runat="server" AutoGenerateColumns="False"
                    DataKeyNames="MaHV" CssClass="table table-bordered table-hover"
                    OnPageIndexChanging="gvHocVienTrongLop_PageIndexChanging" PageSize="20"
                    AllowPaging="True" ShowFooter="True">
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <%-- Bắt sự kiện nhấn cbChonTat --%>
                                <asp:CheckBox ID="cbChonTat" runat="server" onclick="cbChonTat(this);" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%-- Bắt sự kiện nhấn cbChon --%>
                                <asp:CheckBox ID="cbChon" runat="server" onclick="cbChon(this);" />
                            </ItemTemplate>
                            <ItemStyle Width="10px" HorizontalAlign="Center"></ItemStyle>
                        </asp:TemplateField>
                        <asp:BoundField DataField="MaHV" HeaderText="Mã HV"
                            InsertVisible="False" ReadOnly="True" SortExpression="MaHV" />
                        <asp:BoundField DataField="TenHV" HeaderText="Họ tên"
                            SortExpression="TenHV" />
                        <asp:BoundField DataField="TenDonVi" HeaderText="Đơn vị"
                            SortExpression="TenDonVi" />
                        <asp:BoundField DataField="TenChucVu" HeaderText="Chức vụ"
                            SortExpression="TenChucVu" />
                        <asp:BoundField DataField="TenTDChuyenMon" HeaderText="Chuyên môn"
                            SortExpression="TenTDChuyenMon" />
                        <asp:BoundField DataField="TenTDHocVan" HeaderText="Trình độ"
                            SortExpression="TenTDHocVan" />
                        <asp:BoundField DataField="SoKhoaHoc" HeaderText="Tuổi"
                            SortExpression="SoKhoaHoc" />
                    </Columns>
                </asp:GridView>

                <div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl">

                    <asp:LinkButton ID="LinkButton1" runat="server" CssClass="btn" OnClientClick="return ConfirmDelete('Có chắc bạn muốn xóa các dòng đã chọn?');"
                        OnClick="LinkButton1_Click2">Xóa chọn</asp:LinkButton>
                    <asp:Button ID="btnLuu" runat="server" Text="Lưu vào danh sách chính thức" CssClass="btn btn-info"
                        OnClick="btnLuu_Click1" />

                </div>
            </div>
        </div>
    </div>

    <div class="widget-title">
        <a href="#collapseTwo" data-toggle="collapse" class="">
            <span class="icon"><i class="icon-th"></i></span>
            <h5>Danh sách học viên chính thức</h5>
        </a>
    </div>
    <div class="in collapse" id="Div1" style="height: auto;">
        <div class="widget-content nopadding">
            <div id="Div2" class="dataTables_wrapper" role="grid">
                <asp:GridView ID="gvDSHVChinhThuc" runat="server" AutoGenerateColumns="False"
                    DataKeyNames="MaHV" CssClass="table table-bordered table-hover"
                    OnPageIndexChanging="gvHocVienTrongLop_PageIndexChanging" PageSize="20"
                    AllowPaging="True" ShowFooter="True">
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <%-- Bắt sự kiện nhấn cbChonTat --%>
                                <asp:CheckBox ID="cbChonTat" runat="server" onclick="cbChonTat(this);" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%-- Bắt sự kiện nhấn cbChon --%>
                                <asp:CheckBox ID="cbChon" runat="server" onclick="cbChon(this);" />
                            </ItemTemplate>
                            <ItemStyle Width="10px" HorizontalAlign="Center"></ItemStyle>
                        </asp:TemplateField>
                        <asp:BoundField DataField="MaHV" HeaderText="Mã HV"
                            InsertVisible="False" ReadOnly="True" SortExpression="MaHV" />
                        <asp:BoundField DataField="TenHV" HeaderText="Họ tên"
                            SortExpression="TenHV" />
                        <asp:BoundField DataField="TenDonVi" HeaderText="Đơn vị"
                            SortExpression="TenDonVi" />
                        <asp:BoundField DataField="TenChucVu" HeaderText="Chức vụ"
                            SortExpression="TenChucVu" />
                        <asp:BoundField DataField="TenTDChuyenMon" HeaderText="Chuyên môn"
                            SortExpression="TenTDChuyenMon" />
                        <asp:BoundField DataField="TenTDHocVan" HeaderText="Trình độ"
                            SortExpression="TenTDHocVan" />
                        <asp:BoundField DataField="SoKhoaHoc" HeaderText="Tuổi"
                            SortExpression="SoKhoaHoc" />
                    </Columns>
                </asp:GridView>

                <div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl">

                    <asp:LinkButton ID="LinkButton2" runat="server" CssClass="btn" OnClientClick="return ConfirmDelete('Có chắc bạn muốn xóa các dòng đã chọn?');"
                        OnClick="LinkButton2_Click2">Xóa chọn</asp:LinkButton>

                    <div class="btn-group">
                        <%--<asp:Button ID="btThemMoiHocVien" runat="server" Text=" Thêm mới học viên" CssClass="btn" OnClick="btThemMoiHocVien_Click"/>
                      --%>  <a href="#" class="btn">          
                                Thêm mới học viên
                        </a>
                        <button data-toggle="dropdown" class="btn dropdown-toggle">
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu">
                            <li><a href="#themFileExcel" data-toggle="modal">Thêm từ file Excel</a></li>
                            <li> <asp:Button ID="btThemMot" runat="server" Text="Thêm từng học viên" CssClass="btn btn-info"/></li>
                        </ul>
                    </div>

                    <asp:LinkButton ID="lbTaoTKB" runat="server" CssClass="btn" 
                        OnClick="lbTaoTKB_Click">Tạo thời khóa biểu</asp:LinkButton>
                </div>
            </div>
        </div>
    </div>
</div>

<div id="themFileExcel" class="modal hide" aria-hidden="true" style="display: none;">
    <div class="modal-header">
        <button data-dismiss="modal" class="close" type="button">×</button>
        <h3 runat="server" id="H1">Thêm từ file Excel</h3>
    </div>
    <div class="modal-body">
        <asp:FileUpload ID="FileUpload1" runat="server" />
    </div>
    <div class="modal-footer">
        <asp:Button ID="btThemExcel" runat="server" CssClass="btn btn-primary"
            Text="Thêm" OnClick="btThemExcel_Click"/>
        <a data-dismiss="modal" class="btn" href="#">Hủy</a>
        
    </div>
</div>


<%--</asp:UpdatePanel>--%>
